package demo.rabbitmq;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.*;
import org.springframework.stereotype.Component;

/**
 * 由消费者创建一切
 */
@Slf4j
@Component
public class MessageListener {


    /**
     * 配置业务队列和交换机并绑定
     * 声明业务队列时指定死信关系
     *
     * @param callActionId
     */
    @RabbitListener(queues = ExchangeAndQueueConfig.DEATH_RECORD_CHECK_QUEUE)
    @RabbitHandler
    public void handleMessage(String callActionId){
        log.info("接收到消息:"+callActionId);
    }
}
